class CreateAddresses < ActiveRecord::Migration
  def self.up
    create_table :addresses do |t|
      t.column  :customer_id,   :integer
      t.column  :street1,       :string
      t.column  :street2,       :string
      t.column  :postal,        :string
      t.column  :city,          :string
      t.column  :country,       :string
      t.column  :created_on,    :timestamp
      t.column  :updated_on,    :timestamp
      t.column  :lock_version,  :integer, :default => 0
      t.column  :type,          :string
    end
  end

  def self.down
    drop_table :addresses
  end
end
